object ClientDataFrame: TClientDataFrame
  Left = 0
  Top = 0
  Width = 708
  Height = 500
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -13
  Font.Name = 'Tahoma'
  Font.Style = []
  ParentFont = False
  TabOrder = 0
  TabStop = True
  object LeftPanel: TPanel
    Left = 0
    Top = 39
    Width = 517
    Height = 461
    Align = alLeft
    BevelOuter = bvNone
    TabOrder = 0
    object Label6: TLabel
      Left = 0
      Top = 77
      Width = 34
      Height = 16
      Caption = 'Grupp'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object NameLabel1: TLabel
      Left = 0
      Top = 50
      Width = 44
      Height = 16
      Caption = 'Eesnimi'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label4: TLabel
      Left = 0
      Top = 104
      Width = 55
      Height = 16
      Caption = 'M'#228'rkused'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object NameLabel2: TLabel
      Left = 251
      Top = 50
      Width = 50
      Height = 16
      Caption = 'Perenimi'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label1: TLabel
      Left = 251
      Top = 104
      Width = 43
      Height = 16
      Caption = 'Telefon'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label2: TLabel
      Left = 251
      Top = 132
      Width = 36
      Height = 16
      Caption = 'E-mail'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label8: TLabel
      Left = 252
      Top = 179
      Width = 45
      Height = 16
      Caption = 'Piirkond'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label3: TLabel
      Left = 252
      Top = 206
      Width = 45
      Height = 32
      Caption = 'Posti- aadress'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      WordWrap = True
    end
    object Label9: TLabel
      Left = 1
      Top = 182
      Width = 62
      Height = 16
      Caption = 'Reg/isikuk.'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label10: TLabel
      Left = 1
      Top = 206
      Width = 49
      Height = 32
      Caption = 'Registr.- aadress'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      WordWrap = True
    end
    object Label12: TLabel
      Left = 251
      Top = 2
      Width = 56
      Height = 16
      Caption = 'Kaardi nr.'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label13: TLabel
      Left = 0
      Top = 2
      Width = 29
      Height = 16
      Caption = 'T'#252#252'p'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label7: TLabel
      Left = 251
      Top = 77
      Width = 46
      Height = 16
      Caption = 'Lisanimi'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label5: TLabel
      Left = 2
      Top = 304
      Width = 124
      Height = 16
      Cursor = crHandPoint
      Caption = 'Tagasi arve juurde ...'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clNavy
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsUnderline]
      ParentFont = False
    end
    object NameEdit1: TDBEdit
      Left = 72
      Top = 50
      Width = 160
      Height = 24
      DataField = 'EESNIMI'
      DataSource = Source
      TabOrder = 0
    end
    object DBComboBox1: TDBComboBox
      Left = 72
      Top = 77
      Width = 160
      Height = 24
      DataField = 'GRUPP'
      DataSource = Source
      ItemHeight = 16
      TabOrder = 1
    end
    object DBMemo2: TDBMemo
      Left = 72
      Top = 104
      Width = 160
      Height = 54
      DataField = 'MARKUSED'
      DataSource = Source
      TabOrder = 2
    end
    object NameEdit2: TDBEdit
      Left = 321
      Top = 50
      Width = 175
      Height = 24
      DataField = 'PERENIMI'
      DataSource = Source
      TabOrder = 3
    end
    object DBEdit2: TDBEdit
      Left = 321
      Top = 104
      Width = 175
      Height = 24
      DataField = 'TEL'
      DataSource = Source
      TabOrder = 4
    end
    object DBEdit4: TDBEdit
      Left = 321
      Top = 132
      Width = 175
      Height = 24
      DataField = 'EMAIL'
      DataSource = Source
      TabOrder = 5
    end
    object DBComboBox2: TDBComboBox
      Left = 322
      Top = 179
      Width = 175
      Height = 24
      DataField = 'PIIRKOND'
      DataSource = Source
      ItemHeight = 16
      TabOrder = 6
    end
    object DBMemo1: TDBMemo
      Left = 322
      Top = 206
      Width = 175
      Height = 57
      DataField = 'POSTIAADRESS'
      DataSource = Source
      TabOrder = 7
    end
    object DBEdit10: TDBEdit
      Left = 73
      Top = 182
      Width = 160
      Height = 24
      DataSource = Source
      TabOrder = 8
    end
    object DBMemo3: TDBMemo
      Left = 73
      Top = 206
      Width = 160
      Height = 59
      DataField = 'REG_AADRESS'
      DataSource = Source
      TabOrder = 9
    end
    object DBEdit5: TDBEdit
      Left = 321
      Top = 0
      Width = 175
      Height = 24
      DataField = 'KAARDI_KOOD'
      DataSource = Source
      TabOrder = 10
    end
    object SaveButton: TButton
      Left = 322
      Top = 295
      Width = 89
      Height = 25
      Caption = 'Salvesta'
      TabOrder = 11
      OnClick = SaveButtonClick
    end
    object CancelButton: TButton
      Left = 417
      Top = 295
      Width = 81
      Height = 25
      Caption = 'Loobu'
      TabOrder = 12
      OnClick = CancelButtonClick
    end
    object TypeCombo: TDBComboBox
      Left = 72
      Top = 0
      Width = 160
      Height = 24
      Style = csDropDownList
      DataField = 'TYYP'
      DataSource = Source
      ItemHeight = 16
      Items.Strings = (
        'Isik'
        'Firma'
        'Naine'
        'Mees')
      TabOrder = 13
      OnChange = TypeComboChange
    end
    object DBEdit1: TDBEdit
      Left = 321
      Top = 77
      Width = 175
      Height = 24
      DataField = 'PERENIMI'
      DataSource = Source
      TabOrder = 14
    end
  end
  object StatsEdit: TRichEdit
    Left = 517
    Top = 39
    Width = 191
    Height = 461
    Align = alClient
    ReadOnly = True
    ScrollBars = ssBoth
    TabOrder = 1
    WordWrap = False
  end
  object TopPanel: TPanel
    Left = 0
    Top = 0
    Width = 708
    Height = 39
    Align = alTop
    BevelOuter = bvNone
    TabOrder = 2
    object TitleLabel: TLabel
      Left = 0
      Top = 2
      Width = 109
      Height = 19
      Caption = 'Kliendi andmed'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
  end
  object Source: TDataSource
    DataSet = Ds
    Left = 119
    Top = 258
  end
  object Ds: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'id'
        ParamType = ptInput
        Value = '0'
      end>
    ProviderName = 'Provider'
    BeforePost = DsBeforePost
    Left = 151
    Top = 258
    object DsID: TIntegerField
      FieldName = 'ID'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object DsNIMI: TStringField
      FieldName = 'NIMI'
      Required = True
      Size = 50
    end
    object DsTEL: TStringField
      FieldName = 'TEL'
    end
    object DsEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 50
    end
    object DsMARKUSED: TStringField
      FieldName = 'MARKUSED'
      Size = 500
    end
    object DsREG_AADRESS: TStringField
      FieldName = 'REG_AADRESS'
      Size = 100
    end
    object DsPOSTIAADRESS: TStringField
      FieldName = 'POSTIAADRESS'
      Size = 100
    end
    object DsGRUPP: TStringField
      FieldName = 'GRUPP'
      Size = 50
    end
    object DsPIIRKOND: TStringField
      FieldName = 'PIIRKOND'
      Size = 50
    end
    object DsKONTAKTISIK: TStringField
      FieldName = 'KONTAKTISIK'
      Size = 50
    end
    object DsKAARDI_KOOD: TStringField
      FieldName = 'KAARDI_KOOD'
    end
    object DsEESNIMI: TStringField
      FieldName = 'EESNIMI'
    end
    object DsPERENIMI: TStringField
      FieldName = 'PERENIMI'
      Size = 30
    end
    object DsTYYP: TSmallintField
      FieldName = 'TYYP'
      OnChange = DsTYYPChange
      OnGetText = DsTYYPGetText
      OnSetText = DsTYYPSetText
    end
    object DsKEHTIVATE_KAARTIDE_KIRJELDUS: TStringField
      FieldName = 'KEHTIVATE_KAARTIDE_KIRJELDUS'
      Size = 200
    end
    object DsKEELATUD_TOOTED: TStringField
      FieldName = 'KEELATUD_TOOTED'
      Size = 200
    end
    object DsVAIKIMISI_KYLASTUS: TIntegerField
      FieldName = 'VAIKIMISI_KYLASTUS'
    end
    object DsFOTO: TBlobField
      FieldName = 'FOTO'
      Size = 1
    end
  end
  object Provider: TDataSetProvider
    DataSet = Query
    UpdateMode = upWhereKeyOnly
    Left = 183
    Top = 258
  end
  object Query: TSQLDataSet
    SchemaName = 'sysdba'
    GetMetadata = False
    CommandText = 
      'select'#13#10'k.id,'#13#10'k.eesnimi,'#13#10'k.perenimi,'#13#10'k.nimi,'#13#10'k.tel,'#13#10'k.email' +
      ','#13#10'k.markused,'#13#10'k.reg_aadress,'#13#10'k.postiaadress,'#13#10'k.grupp,'#13#10'k.pii' +
      'rkond,'#13#10'k.kontaktisik,'#13#10'k.kaardi_kood,'#13#10'k.tyyp,'#13#10'k.foto,'#13#10'ai.keh' +
      'tivate_kaartide_kirjeldus,'#13#10'ai.keelatud_tooted,'#13#10'ai.vaikimisi_ky' +
      'lastus'#13#10'from KLIENDID k'#13#10'left join kliendi_arvutatud_info(k.id) ' +
      'ai on 1=1'#13#10'where id = :id'
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'id'
        ParamType = ptInput
        Value = '0'
      end>
    SQLConnection = ProgramModule.Connection
    Left = 215
    Top = 258
    object QueryID: TIntegerField
      FieldName = 'ID'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object QueryEESNIMI: TStringField
      FieldName = 'EESNIMI'
    end
    object QueryPERENIMI: TStringField
      FieldName = 'PERENIMI'
      Size = 30
    end
    object QueryNIMI: TStringField
      FieldName = 'NIMI'
      Required = True
      Size = 50
    end
    object QueryTEL: TStringField
      FieldName = 'TEL'
    end
    object QueryEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 50
    end
    object QueryMARKUSED: TStringField
      FieldName = 'MARKUSED'
      Size = 500
    end
    object QueryREG_AADRESS: TStringField
      FieldName = 'REG_AADRESS'
      Size = 100
    end
    object QueryPOSTIAADRESS: TStringField
      FieldName = 'POSTIAADRESS'
      Size = 100
    end
    object QueryGRUPP: TStringField
      FieldName = 'GRUPP'
      Size = 50
    end
    object QueryPIIRKOND: TStringField
      FieldName = 'PIIRKOND'
      Size = 50
    end
    object QueryKONTAKTISIK: TStringField
      FieldName = 'KONTAKTISIK'
      Size = 50
    end
    object QueryKAARDI_KOOD: TStringField
      FieldName = 'KAARDI_KOOD'
    end
    object QueryTYYP: TSmallintField
      FieldName = 'TYYP'
    end
    object QueryKEHTIVATE_KAARTIDE_KIRJELDUS: TStringField
      FieldName = 'KEHTIVATE_KAARTIDE_KIRJELDUS'
      Size = 200
    end
    object QueryKEELATUD_TOOTED: TStringField
      FieldName = 'KEELATUD_TOOTED'
      Size = 200
    end
    object QueryVAIKIMISI_KYLASTUS: TIntegerField
      FieldName = 'VAIKIMISI_KYLASTUS'
    end
    object QueryFOTO: TBlobField
      FieldName = 'FOTO'
      Size = 1
    end
  end
end
